package serverDB_classes;

import java.util.HashSet;
import java.util.Set;

/**
 * UserFiles - the files that of the user. 
 * 				include: id of the file, the path of the file ,
 * 				 the share directories and sub directories , and check sum.  
 * @author Orit
 *
 */
public class UserFiles {
	
	private int fileId;
	private String filePath;
	private Set<Dir> dirs = new HashSet<Dir>();	
	private CheckSums checkSum;
	
	/***
	 * UserFiles cto'r
	 * @param filePath - the path of the file
	 * @param dirs - all directories 
	 * @param checkSum - unic number for the file 
	 */
	public UserFiles(String filePath,Set<Dir> dirs,CheckSums checkSum) {
		this.filePath=filePath;
		this.dirs=dirs;
		this.checkSum=checkSum;
	}
	/**
	 * default Cto'r
	 */
	public UserFiles() {	
	}
	
	//--------------setters %% getters---------------------//
	/**
	 * set the check sum in the user files
	 * @param checkSum
	 */
	public void setCheckSum(CheckSums checkSum) {
		this.checkSum = checkSum;
	}
	
	/**
	 * @return check sum of the user file
	 */
	public CheckSums getCheckSum() {
		return checkSum;
	}
	
	/**
	 * @return the id of file 
	 */
	public int getFileId() {
		return fileId;
	}
	
	/**
	 * @return the path of the file 
	 */
	public String getFilePath() {
		return filePath;
	}
	
	/**
	 * 
	 * @return set of the share directories and sub directories in User File
	 */
	public Set<Dir> getDirs() {
		return dirs;
	}
	
	/**
	 * set the the share directories and sub directories of the user
	 * @param dirs 
	 */
	public void setDirs(Set<Dir> dirs) {
		this.dirs = dirs;
	}
	
	/**
	 * set the id of the file
	 * @param fileId
	 */
	public void setFileId(int fileId) {
		this.fileId = fileId;
	}
	
	/**
	 * set the path of the file
	 * @param filePath
	 */
	public void setFilePath(String filePath) {
		this.filePath = filePath;
	}

	
}
